//package com.example.dao;
//
//import org.junit.Test;
//
//import java.sql.Connection;
//import java.sql.PreparedStatement;
//import java.sql.SQLException;
//import java.util.Scanner;
//
//public class zsgDao {
//    Scanner sc = new Scanner(System.in);
//
//    @Test
//    public void add() {
//        Connection connection = null;
//        PreparedStatement ps = null;
//        String sq = "insert into aabb value(null ,?)";
//        try {
//            connection = BaseDao.getconnection();
//            ps = connection.prepareStatement(sq);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        String[] sql = {"冯亚辉", "大潮比", "修沟", "曹芬"};
//        for (String s : sql) {
//            try {
//                ps.setObject(1, s);
//                ps.addBatch();
//            } catch (SQLException throwables) {
//                throwables.printStackTrace();
//            }
//        }
//        try {
//            int[] ints = ps.executeBatch();
//            for (int anInt : ints) {
//                System.out.println(anInt);
//            }
//        } catch (SQLException throwables) {
//            throwables.printStackTrace();
//        }
//
//
//        // String sql = "insert into book(FlowID,Type,IDCard,ExamCard,StudentName,Location,Grade) values (?,?,?,?,?,?,? )";
////        Object[] params = {
////                b.getFlowID(),
////                b.getType(),
////                b.getIDCard(),
////                b.getExamCard(),
////                b.getStudentName(),
////                b.getLocation(),
////                b.getGrade()
////        };
////        int num = add_delet_Dao.zs(sql, params);
////        if (num > 0) {
////            System.out.println("成功");
////        } else {
////            System.out.println("失败");
////        }
////    }
//
//
////    public void delet(examstudent b) {
////        String sql = "DELETE FROM examstudent WHERE ExamCard=?";
////        Object[] params = {
////                b.getExamCard()
////        };
////        int num = add_delet_Dao.zs(sql, params);
////        if (num > 0) {
////            System.out.println("删除成功");
////        } else {
////            System.out.println("查无此人!请重新输入");
////        }
////    }
////
////public  void  update(examstudent b){
////    String sql ="update examstudent set FlowID = ? ,Type= ? ,IDCard=? ,ExamCard=?,StudentName=?,Location=?,Grade=?  where ExamCard=?";
////    Object[] params ={
////            b.getFlowID(),
////            b.getType(),
////            b.getIDCard(),
////            b.getExamCard(),
////            b.getStudentName(),
////            b.getLocation(),
////            b.getGrade(),
////    };
////    int num = add_delet_Dao.zs(sql,params);
////    if (num > 0) {
////        System.out.println("成功");
////    } else {
////        System.out.println("失败");
////    }
////}
////
////    public List<examstudent> slect(examstudent ex) {
////        List<examstudent> list = new ArrayList<>();
////        Connection co = null;
////        try {
////            co = BaseDao.getconnection();
////        } catch (Exception e) {
////            e.printStackTrace();
////        }
////
////        PreparedStatement ps = null;
////        ResultSet rs = null;
////        String sql = "select * from examstudent where IDCard =? or ExamCard = ? ";
////        try {
////            ps = co.prepareStatement(sql);
////            ps.setObject(1, ex.getIDCard());
////            ps.setObject(2, ex.getExamCard());
////            rs = ps.executeQuery();
////            while (rs.next()) {
////                examstudent b = new examstudent();
////                b.setFlowID(rs.getInt("FlowID"));
////                b.setType(rs.getInt("Type"));
////                b.setIDCard(rs.getString("IDCard"));
////                b.setExamCard(rs.getString("ExamCard"));
////                b.setStudentName(rs.getString("StudentName"));
////                b.setLocation(rs.getString("Location"));
////                b.setGrade(rs.getInt("Grade"));
////                list.add(b);
////            }
////        } catch (SQLException throwables) {
////            throwables.printStackTrace();
////        } finally {
////            lianjieDao.close(co, ps, rs);
////        }
////        return list;
////    }
////
//    }
//}
